package com.t01.bdqn.common;


import lombok.Data;

@Data
//定义一个通用的api返回结果
public class ApiResult {

    //api 的状态码
    private int code;
    //api 的提示消息
    private String msg;
    private Object data;

    public ApiResult(int code, String msg, Object data) {
        this.code = code;
        this.msg = msg;
        this.data = data;
    }

    public ApiResult(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public ApiResult(String msg) {
        this.code = 200;
        this.msg = msg;
    }
}
